<div ng-init="vm.init();refresh();">
  <div class="row x-page-header">
    <div class="col-md-12">
      <div class="x-page-title">MOCK 用户管理模块</div>

    </div>
  </div>
  <div class="row x-page-body">
    <table id="dataList" class="table table-bordered table-striped table-hover dataTable">
      <thead>
      <tr >
        <th class="sorting_asc">LoginName</th>
        <th class="sorting">Role</th>
        <th class="sorting_asc">CreateDate</th>
        <th class="sorting_asc">UpdateDate</th>
        <th class="text-center">Operation</th>
      </tr>
      </thead>
      <tbody>
      <tr ng-repeat="user in vm.users">
        <td>{{user.email}}</td>
        <td>{{user.role}}</td>
        <!--<td>{{FormData(user.created,'yyyy')}}</td>-->
        <td>{{user.created|date:'yyyy/MM/dd HH:mm:ss'}}</td>
        <td>{{user.modified|date:'yyyy/MM/dd HH:mm:ss'}}</td>

        <td class="text-center">
          <button type="button" ng-if="user.role == 'user'" ng-click="vm.updateUser(user.email,'update')"  class="btn bg-olive btn-xs" >UpdateRole</button>
          <button type="button"  class="btn bg-olive btn-xs" ng-click="vm.updateUser(user.email,'delete')" >Remove</button>
        </td>
      </tr>
      </tbody>
    </table>

  </div>
</div>
